package com.example.examsystem2.service.serviceImpl;


import com.example.examsystem2.entity.Exam;
import com.example.examsystem2.mapper.ExamMapper;
import com.example.examsystem2.service.ExamService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ExamServiceImpl implements ExamService {

    @Resource
    private ExamMapper examMapper;

    public void setExamMapper(ExamMapper examMapper) {
        this.examMapper = examMapper;
    }

    @Override
    public int add_exam(Exam exam) {
        return examMapper.add_exam(exam);
    }

    @Override
    public Exam get_exam_by_e_id(int e_id) {
        return examMapper.get_exam_by_e_id(e_id);
    }

    @Override
    public List<Exam> get_all_exam() {
        return examMapper.get_all_exam();
    }

    @Override
    public int del_exam_e_id(int e_id) {
        return examMapper.del_exam_e_id(e_id);
    }

    @Override
    public List<Exam> get_exam_by_s_id(int s_id) {
        return examMapper.get_exam_by_s_id(s_id);
    }
}
